# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=kdsoap-ws-discovery-client
pkgver=0.3.0
pkgrel=2
pkgdesc='WS-Discovery client library based on KDSoap'
license=(GPL3 custom)
arch=(loong64 x86_64)
url='https://caspermeijn.gitlab.io/kdsoap-ws-discovery-client/'
depends=(gcc-libs
         glibc
         kdsoap-qt6
         qt6-base)
makedepends=(doxygen
             extra-cmake-modules
             qt6-doc
             qt6-tools)
source=(https://download.kde.org/unstable/kdsoap-ws-discover-client/$pkgname-$pkgver.tar.xz{,.sig})
sha256sums=('5007747f1ce607639bb63244f8894c03a15194c0a891b8d85e10d76dbdf79188'
            'SKIP')
validpgpkeys=(E0A3EB202F8E57528E13E72FD7574483BB57B18D) # Jonathan Esk-Riddell <jr@jriddell.org>

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DBUILD_QCH=ON \
    -DQT_MAJOR_VERSION=6
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
  install -Dm644 $pkgname-$pkgver/LICENSES/* -t "$pkgdir"/usr/share/licenses/$pkgname
}
